<% add_decidim_meta_tags(
  title: t("participatory_processes.index.title", scope: "decidim"),
  resource: current_participatory_space) %>

<%
edit_link(
  decidim_admin_participatory_processes.participatory_processes_path,
  :read,
  :process_list
)
%>

<%= append_stylesheet_pack_tag "decidim_participatory_processes", media: "all" %>
<%= append_javascript_pack_tag "decidim_participatory_processes" %>

<% content_for :aside do %>
  <h1 class="title-decorator"><%= component_name %></h1>

  <%= render partial: "decidim/shared/filters", locals: { filter_sections:, skip_to_id: "processes-grid" } %>
<% end %>

<%= render layout:"layouts/decidim/shared/layout_two_col" do %>

  <%= participatory_space_floating_help %>

  <% if promoted_collection.any? %>
    <section id="highlighted-processes" class="layout-main__section layout-main__heading">
      <h2 class="h5 md:h3 decorator"><%= t("participatory_processes.index.promoted_processes", scope: "layouts.decidim") %></h2>

      <% promoted_collection.each do |promoted_item| %>
        <%= card_for promoted_item, highlight: true, size: :g %>
      <% end %>
    </section>
  <% end %>

  <section id="processes-grid" class="layout-main__section layout-main__heading">
    <%= render partial: "collection" %>
  </section>
<% end %>
